#ifndef __PID_H__
#define __PID_H__

#include <stdint.h>

typedef struct{
	float Kp;
	float Ki;
	float Kd;
	
	float Error0;
	float Error1;
	float ErrorInt;
	
	uint8_t Actual;
	float Out;

	float Target;
	
	float OutMax;
	float OutMin;
	float IntMax;
}PID_t;

uint8_t EmyGetDisFlag(uint8_t CheckDistane,PID_t* pc);
void PID_Calculate(PID_t* p);

#endif
